package com.example.demo.store.controller;


import com.example.demo.store.feign.IAccountFeign;
import com.example.demo.store.service.IStorageTblService;
import com.netflix.discovery.converters.Auto;
import io.seata.core.context.RootContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zgq
 * @since 2020-12-07
 */
@Slf4j
@RestController
@RequestMapping("/store")
public class StorageTblController {


    @Autowired
    IStorageTblService storageTblService;

    @Autowired
    IAccountFeign accountFeign;



    @RequestMapping("/test")
    public int test(String userId,int amt){
        log.info("StorageTblController->test");

        storageTblService.dec(userId,amt);

        return 0;
    }

}
